package com.atguigu.lease.web.app.mapper;

import com.atguigu.lease.model.entity.BrowsingHistory;
import com.atguigu.lease.web.app.vo.history.HistoryItemVo;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

/**
 * @author xiongkunYang
 * @description 针对表【browsing_history(浏览历史)】的数据库操作Mapper
 * @createDate 2025-04-19 22:27:34
 * @Entity com.atguigu.lease.model.entity.BrowsingHistory
 */
@Mapper
public interface BrowsingHistoryMapper extends BaseMapper<BrowsingHistory> {

    /**
     * 查询用户浏览历史
     *
     * @param page 分页对象，用于封装分页信息和数据
     * @param userId 用户id
     * @return 填充了浏览历史信息的分页对象
     */
    IPage<HistoryItemVo> selectHistoryItemPageByUsrId(@Param("page") Page<HistoryItemVo> page,
                                                      @Param("userId") Long userId);
}




